#ifndef _BRAIN_KEYBOARDSTATE
#define _BRAIN_KEYBOARDSTATE


class KeyDown {
public:
	KeyDown() {
		scancode=-1;
		sym=-1;
		unicode=-1;
		time=0;
	};
	int scancode;
	int sym;
	int unicode;
	int time;
};

class KEYBOARDSTATE {
public:
	KEYBOARDSTATE();
	~KEYBOARDSTATE();

	void copy(KEYBOARDSTATE *lvk);

	void cycle(void);

	bool save(FILE *fp);
	bool load(FILE *fp);

	void key_down(SDL_keysym ks);
	void key_up(SDL_keysym ks);
	
	int n_joysticks;
	SDL_Joystick **joysticks;

	int joystick_0_pos,joystick_size;	/* start of the first joystick and joystick size */ 
	int LVK_ID;

	int k_size;							/* number of inputs */ 
	unsigned char *old_keyboard;
	unsigned char *keyboard;
	List<KeyDown> keys_down;
};

#endif
